<?php
	$siteurl = get_bloginfo('template_url');
	get_header();
	
	$category = get_the_category();
	$cat_id = $category[0]->cat_ID;
	$cat_name = $category[0]->cat_name;
	$cat_slug = $category[0]->category_nicename;
	
?>
<div id="main">
			<div>
				<span class="li_01">
					您当前位置&nbsp;&gt;&nbsp;
					<a href="http://www.tueye.com">首页</a>&nbsp;&gt;&nbsp;
					<?php $category = get_the_category(); ?>
					<a href="/<?php echo $cat_slug ?>/?nowcatid=<?php echo $cat_id ?>"><?php echo  $cat_name  ?></a>&nbsp;&gt;&nbsp;
					<a href="<?php echo the_permalink(); ?>"><?php echo the_title(); ?></a>
				</span>
			</div>
			<div id="m_top">
				<p class="p1"><?php echo $cat_name; ?></p><p class="p2">推荐：</p>
				<?php 
					$recommendposts = get_posts ( "orderby=rand&numberposts=2&category=$cat_id" ); 
					foreach ( $recommendposts as $tuipost ) {
				?>
					<span class="article_topnext tuijian"><a href="<?php echo get_permalink ( $post->ID ); ?>"><?php echo $tuipost->post_title ?></a></span>
				<?php } ?>
			</div>
			<h2 class="h1"><?php echo the_title(); ?></h2>
			<!--m_top结束-->
			<div id="m_main">
				<div id="contectheander">
					发布日期: <?php the_time('Y年n月j日'); ?> &nbsp;
					&nbsp;&nbsp;&nbsp;作者:燃烧&nbsp;&nbsp;&nbsp;&nbsp;关键词:<b><?php echo  $cat_name  ?></b>
				</div>
				<div id="m_main-1">
					<?php echo $post->post_content  ?>
				</div>
			</div>
				<span id="top_art" class="article_topnext"><?php previous_post_link('看图网上一篇文章: %link'); ?></span>
				<span id="next_art" class="article_topnext"><?php next_post_link('看图网下一篇文章: %link'); ?>

</span>
		</div>
		<!--main结束-->
		<div id="sub">
			<div id="column1">
				<img class="p6" src="<?php echo $siteurl; ?>/img/m_colum1-L.gif" />
				<div id="column1-1">
					<img class="p6" src="<?php echo $siteurl; ?>/img/m_colum1-C1.gif" title="<?php echo $cat_name; ?>专题相关文章" name="<?php echo $cat_name; ?>专题相关文章" />
					<h2><?php echo $cat_name; ?>专题相关文章</h2>
					<ul style="float:left;">
					<?php
					$aboutposts = get_posts ( "orderby=post_date&numberposts=16&category=$cat_id" ); 
					foreach ( $aboutposts as $Apost ) {
					 ?>
						<li><a href="<?php echo get_permalink ( $Apost->ID ); ?>"><?php echo  mb_strimwidth ( strip_tags ( apply_filters ( 'the_title', $Apost->post_title ) ), 0, 26, "…" ) ?></a></li>
					<?php } ?> 
					</ul>
					<ul style="float:right;">
					<?php
					$aboutposts = get_posts ( "orderby=post_date&numberposts=16&category=$cat_id" ); 
					foreach ( $aboutposts as $post ) {
					?>
					<li><?php the_time('Y-n-j');  ?></li> 
					<?php } ?>
					</ul>
				</div>
				<img class="p6" src="<?php echo $siteurl; ?>/img/m_colum1-R.gif" />
			</div>
			<div id="column2">
				<img class="p6" src="<?php echo $siteurl; ?>/img/m_colum2-L.gif" />
				<div id="column2-1">
					<img class="p6" src="<?php echo $siteurl; ?>/img/m_colum2-C.gif" title="<?php echo $cat_name; ?>编辑推荐" name="<?php echo $cat_name; ?>编辑推荐" />
					<img class="p6" style="padding-top:3px;" src="<?php echo $siteurl; ?>/img/m_colum1-li3.gif" />
					<h2 class="singletitle"><?php echo $cat_name; ?>编辑推荐</h2>
					<ul style="float:left; padding-left:5px;">
					<?php
						$newposts = get_posts ( "orderby=rand&numberposts=12&category=$cat_id" );
						foreach ( $newposts as $post ) {
					?>
					<li><a href="<?php echo get_permalink ( $post->ID ); ?>"><?php echo  mb_strimwidth ( strip_tags ( apply_filters ( 'the_title', $post->post_title ) ), 0, 26, "…" ) ?></a></li>   
					<?php } ?>
					</ul>
					<ul style="float:right;">
					<?php
						$newposts = get_posts ( "orderby=rand&numberposts=12&category=$cat_id" );
						foreach ( $newposts as $post ) {
					?>
					<li><?php the_time('Y-n-j');  ?></li>      
					<?php } ?>
					</ul>
				</div>
				<img class="p6" src="<?php echo $siteurl; ?>/img/m_colum2-R.gif" />
			</div>
			<div id="column2">
				<img class="p6" src="<?php echo $siteurl; ?>/img/m_colum2-L.gif" />
				<div id="column2-1">
					<img class="p6" src="<?php echo $siteurl; ?>/img/m_colum3-C.gif" title="<?php echo $cat_name; ?>热门点击排行" name="<?php echo $cat_name; ?>热门点击排行" />
					<img class="p6" style="padding-top:3px;" src="<?php echo $siteurl; ?>/img/m_colum1-li3.gif" />
					<h2 class="singletitle"><?php echo $cat_name; ?>热门点击排行</h2>
					<ul style="float:left; padding-left:5px;">
						<?php
						$newposts = get_posts ( "orderby=post_date&order=DESC&numberposts=12&category=$cat_id" );
						foreach ( $newposts as $post ) {
					?>
					<li><a href="<?php echo get_permalink ( $post->ID ); ?>"><?php echo  mb_strimwidth ( strip_tags ( apply_filters ( 'the_title', $post->post_title ) ), 0, 26, "…" ) ?></a></li>   
					<?php } ?>
					</ul>
					<ul style="float:right;">
						<?php
						$newposts = get_posts ( "orderby=post_date&order=DESC&numberposts=12&category=$cat_id" );
						foreach ( $newposts as $post ) {
					?>
					<li><?php the_time('Y-n-j');  ?></li>      
					<?php } ?>
					</ul>
				</div>
				<img class="p6" src="<?php echo $siteurl; ?>/img/m_colum2-R.gif" />
			</div>
		</div>
<?php 
	get_footer();
?>